package com.nstar.model.orderexpress;

import java.io.Serializable;
import java.util.Date;
import java.util.Set;
import org.apache.commons.lang.builder.ToStringBuilder;


/** 
 *        @hibernate.class
 *         table="holiday"
 *     
*/
public class Holiday implements Serializable {

    /** identifier field */
    private String holidayId;

    /** nullable persistent field */
    private String name;

    /** nullable persistent field */
    private Date startDate;

    /** nullable persistent field */
    private Date endDate;

    /** nullable persistent field */
    private String holidayDesc;

    /** nullable persistent field */
    private String state;

    /** persistent field */
    private Set repositories;

    /** full constructor */
    public Holiday(String holidayId, String name, Date startDate, Date endDate, String holidayDesc, String state, Set repositories) {
        this.holidayId = holidayId;
        this.name = name;
        this.startDate = startDate;
        this.endDate = endDate;
        this.holidayDesc = holidayDesc;
        this.state = state;
        this.repositories = repositories;
    }

    /** default constructor */
    public Holiday() {
    }

    /** minimal constructor */
    public Holiday(String holidayId, Set repositories) {
        this.holidayId = holidayId;
        this.repositories = repositories;
    }

    /** 
     *            @hibernate.id
     *             generator-class="assigned"
     *             type="java.lang.String"
     *             column="HOLIDAY_ID"
     *         
     */
    public String getHolidayId() {
        return this.holidayId;
    }

    public void setHolidayId(String holidayId) {
        this.holidayId = holidayId;
    }

    /** 
     *            @hibernate.property
     *             column="NAME"
     *             length="100"
     *         
     */
    public String getName() {
        return this.name;
    }

    public void setName(String name) {
        this.name = name;
    }

    /** 
     *            @hibernate.property
     *             column="START_DATE"
     *             length="19"
     *         
     */
    public Date getStartDate() {
        return this.startDate;
    }

    public void setStartDate(Date startDate) {
        this.startDate = startDate;
    }

    /** 
     *            @hibernate.property
     *             column="END_DATE"
     *             length="19"
     *         
     */
    public Date getEndDate() {
        return this.endDate;
    }

    public void setEndDate(Date endDate) {
        this.endDate = endDate;
    }

    /** 
     *            @hibernate.property
     *             column="HOLIDAY_DESC"
     *             length="300"
     *         
     */
    public String getHolidayDesc() {
        return this.holidayDesc;
    }

    public void setHolidayDesc(String holidayDesc) {
        this.holidayDesc = holidayDesc;
    }

    /** 
     *            @hibernate.property
     *             column="STATE"
     *             length="1"
     *         
     */
    public String getState() {
        return this.state;
    }

    public void setState(String state) {
        this.state = state;
    }

    /** 
     *            @hibernate.set
     *             lazy="true"
     *             inverse="true"
     *             cascade="none"
     *            @hibernate.collection-key
     *             column="HOLIDAY_ID"
     *            @hibernate.collection-one-to-many
     *             class="com.nstar.model.orderexpress.Repository"
     *         
     */
    public Set getRepositories() {
        return this.repositories;
    }

    public void setRepositories(Set repositories) {
        this.repositories = repositories;
    }

    public String toString() {
        return new ToStringBuilder(this)
            .append("holidayId", getHolidayId())
            .toString();
    }

}
